package ynu.edu.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import ynu.edu.entities.BaseResponse;

import java.util.Map;

/**
 * 食品服务Feign客户端
 */
@FeignClient(name = "food-service", fallback = FoodFeignClientFallback.class)
public interface FoodFeignClient {

    /**
     * 获取食品信息
     */
    @GetMapping("/food/{foodId}")
    BaseResponse<Map<String, Object>> getFoodById(@PathVariable("foodId") Integer foodId);
} 